import { EntitySchema } from '@mikro-orm/core';

export class ImsYzdKpCourseAttribute {
  id!: number;
  courseId!: number;
  isCollect: boolean = false;
  isLike: boolean = false;
  userId!: number;
  uniacid!: number;
}

export const ImsYzdKpCourseAttributeSchema = new EntitySchema({
  class: ImsYzdKpCourseAttribute,
  properties: {
    id: { primary: true, type: 'number' },
    courseId: { type: 'number', index: 'course_id' },
    isCollect: { type: 'boolean', default: false },
    isLike: { type: 'boolean', default: false },
    userId: { type: 'number', index: 'user_id' },
    uniacid: { type: 'number', index: 'uniacid' },
  },
});
